package com.PVZ.model.weapon;

import com.PVZ.model.Entity;
import com.PVZ.model.emuns.AnimeType;
import com.PVZ.model.emuns.Configs;
import com.PVZ.model.emuns.WeaponType;
import com.PVZ.model.emuns.ZombieType;

import java.util.List;

/**
 * Created by @Author: kabuda on @Date: 2021/6/22 22:21
 */
public class Bite extends Weapon{

    int damage;

    public Bite(int damage){
        this.damage = damage;
        this.setCoolDown(Configs.attackCoolDown.get(WeaponType.Bite));
    }

    public Bite(){
        this.damage = Configs.demages.get(ZombieType.NormalZombie);
        this.setCoolDown(Configs.attackCoolDown.get(WeaponType.Bite));
    }

    // @Override
    // public void attack(Entity attacker,List<Entity> enemies) {
    //
    //     if(getCurCoolTime()>=getCoolDown()){
    //         attacker.setCurAnimeType(AnimeType.ATTACK);
    //
    //         //冷却到了
    //         for (Entity enemy : enemies) {
    //             enemy.setHealth(enemy.getHealth()-this.damage);
    //         }
    //
    //         //进入冷却
    //         setCurCoolTime(0);
    //     }
    //
    // }
}
